import com.spring.Controller.Interface.UserController;
import com.spring.Entity.UserEntity;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpSession;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Arabira on 2016/8/15.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"classpath:application-context.xml", "classpath:spring-context.xml"})
public class testAOP {
    @Autowired
    private UserController userController;
    private MockHttpSession session = new MockHttpSession();
    private MockHttpServletRequest mockHttpServletRequest = new MockHttpServletRequest();

    @Test
    public void test() {
        UserEntity userEntity = new UserEntity();
        userController.testLogin(userEntity, session, mockHttpServletRequest);
    }
}
